//router.js
var url = require('url');
var reqHandler = require("./reqHandler.js");
function route(req,res){
	var pathname = url.parse(req.url).pathname;
	console.log("访问路径为：" + pathname);
	var handle = new reqHandler();
	if (pathname == "/") handle.start(res);
	else if(pathname == "/index") handle.start(res);
	else if(pathname == "/show") handle.show(res);
	else handle.notFound(res);
}
exports.route = route;